package cn.zeal4j.util;

import sun.dc.pr.PRError;

import java.util.List;

/**
 * @author Administrator
 * @file IntelliJ IDEA Spring-Mail
 * @create 2020 09 22 11:59
 */
public class EmailUtil {
    private String emailProviderHost;
    private String emailProviderPort;
    private String senderAddress;
    private List<String> recipientAddressList;
    private String authUsername;
    private String authPassword;
    private String emailSubject;
    private String emailContent;
    private Boolean needAuth;
    private List<String> attachmentFileNameList;

    public EmailUtil() {
    }

    public EmailUtil(String emailProviderHost, String emailProviderPort, String senderAddress, List<String> recipientAddressList, String authUsername, String authPassword, String emailSubject, String emailContent, Boolean needAuth, List<String> attachmentFileNameList) {
        this.emailProviderHost = emailProviderHost;
        this.emailProviderPort = emailProviderPort;
        this.senderAddress = senderAddress;
        this.recipientAddressList = recipientAddressList;
        this.authUsername = authUsername;
        this.authPassword = authPassword;
        this.emailSubject = emailSubject;
        this.emailContent = emailContent;
        this.needAuth = needAuth;
        this.attachmentFileNameList = attachmentFileNameList;
    }

    public EmailUtil(String emailProviderHost, String emailProviderPort, String senderAddress, List<String> recipientAddressList, String authUsername, String authPassword, String emailSubject, String emailContent, Boolean needAuth) {
        this(
                emailProviderHost,
                emailProviderPort,
                senderAddress,
                recipientAddressList,
                authUsername,
                authPassword,
                emailSubject,
                emailContent,
                needAuth,
                null
        );
    }

    public String getEmailProviderHost() {
        return emailProviderHost;
    }

    public void setEmailProviderHost(String emailProviderHost) {
        this.emailProviderHost = emailProviderHost;
    }

    public String getEmailProviderPort() {
        return emailProviderPort;
    }

    public void setEmailProviderPort(String emailProviderPort) {
        this.emailProviderPort = emailProviderPort;
    }

    public String getSenderAddress() {
        return senderAddress;
    }

    public void setSenderAddress(String senderAddress) {
        this.senderAddress = senderAddress;
    }

    public List<String> getRecipientAddressList() {
        return recipientAddressList;
    }

    public void setRecipientAddressList(List<String> recipientAddressList) {
        this.recipientAddressList = recipientAddressList;
    }

    public String getAuthUsername() {
        return authUsername;
    }

    public void setAuthUsername(String authUsername) {
        this.authUsername = authUsername;
    }

    public String getAuthPassword() {
        return authPassword;
    }

    public void setAuthPassword(String authPassword) {
        this.authPassword = authPassword;
    }

    public String getEmailSubject() {
        return emailSubject;
    }

    public void setEmailSubject(String emailSubject) {
        this.emailSubject = emailSubject;
    }

    public String getEmailContent() {
        return emailContent;
    }

    public void setEmailContent(String emailContent) {
        this.emailContent = emailContent;
    }

    public Boolean getNeedAuth() {
        return needAuth;
    }

    public void setNeedAuth(Boolean needAuth) {
        this.needAuth = needAuth;
    }

    public List<String> getAttachmentFileNameList() {
        return attachmentFileNameList;
    }

    public void setAttachmentFileNameList(List<String> attachmentFileNameList) {
        this.attachmentFileNameList = attachmentFileNameList;
    }

    @Override
    public String toString() {
        return "EmailUtil{" +
                "emailProviderHost='" + emailProviderHost + '\'' +
                ", emailProviderPort='" + emailProviderPort + '\'' +
                ", senderAddress='" + senderAddress + '\'' +
                ", recipientAddressList=" + recipientAddressList +
                ", authUsername='" + authUsername + '\'' +
                ", authPassword='" + authPassword + '\'' +
                ", emailSubject='" + emailSubject + '\'' +
                ", emailContent='" + emailContent + '\'' +
                ", needAuth=" + needAuth +
                ", attachmentFileNameList=" + attachmentFileNameList +
                '}';
    }
}
